{% extends "base.html" %}
{% from "macros.jinja" import print_flash_messages %}
{% block body %}

<div class="container">
    <div id="loginbox" style="margin-top:50px;" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
        <div class="panel panel-info" >
                <div class="panel-heading">
                    <div class="panel-title">SaltPad</div>
                </div>

                <div style="padding-top:30px" class="panel-body" >

                    {{ print_flash_messages()|safe }}

                    <div style="display:none" id="login-alert" class="alert alert-danger col-sm-12"></div>

                    <form id="loginform" class="form-horizontal" role="form" action="{{ url_for('login', **request.args) }}" method="post">

                        {{ form.csrf_token }}

                        <div style="margin-bottom: 25px" class="input-group">
                                    <span class="input-group-addon"><i class="fa fa-fw fa-user"></i></span>
                                    <input id="login-username" type="text" class="form-control" name="username" value="" placeholder="username or email">
                                </div>

                        <div style="margin-bottom: 25px" class="input-group">
                                    <span class="input-group-addon"><i class="fa fa-fw fa-key"></i></span>
                                    <input id="login-password" type="password" class="form-control" name="password" placeholder="password">
                                </div>

                            <div style="margin-top:10px" class="form-group">
                                <!-- Button -->

                                <div class="col-sm-12 controls">
                                  <input type="submit" value="Login" class="btn btn-success">
                                </div>
                            </div>
                        </form>



                    </div>
                </div>
    </div>
</div>


{% endblock %}
